<?php
namespace app\admin\logic;
use app\admin\code\BaseCode;
use app\admin\model\EngineeringImgModel;
use app\admin\model\EngineeringModel;
use app\admin\model\UserModel;
use app\admin\validate\BaseValidate;
use think\Lang;

class UserLogic extends BaseLogic
{

    public function update_status(BaseValidate $validate){
        if($validate->validate($this->_param,__FUNCTION__) === false){
            $this->result = false;
            $this->err = $validate->getError();
            return false;
        }else{
            $model = new UserModel();
            $model->save(['is_use'=>$this->_param['is_use']],['id'=>$this->_param['id']]);
            return true;
        }
    }
}


